package cn.com.cym.gamezao.repository.xmu.recruit;

import cn.com.cym.gamezao.base.BaseRepository;
import cn.com.cym.gamezao.entity.authorize.User;
import cn.com.cym.gamezao.entity.xmu.recruit.TrainExperience;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.stereotype.Repository;

import java.util.List;

@RedisHash
@Repository
public interface TrainExperienceRepository extends BaseRepository<TrainExperience,Long> {
    List<TrainExperience> findAllByUser(User user);

    @Query("from TrainExperience where user.id=:userId")
    List<TrainExperience> findAllByUserId(Long userId);
}
